package com.itheima.string;

import java.util.Scanner;

public class Demo2 {
    public static void main(String[] args) {

        for (int i = 1; i <=3; i++) {
            String username="admin";
            String password="123456";

            Scanner sc=new Scanner(System.in);

            String scUsername = sc.next();
            String scPassword = sc.next();

            if(username.equals(scUsername)&&password.equals(scPassword)){
                System.out.println("登陆成功");
                break;
            }else if(i==3){
                System.out.println("今日已达上限,明日再来");
            }else{
                System.out.println("密码错误还剩"+(3-i)+"次");
            }

        }


    }
}
